Class Characteristic<T>
Represents a Bluetooth characteristic with a generic value of type <code class="typeparamref">T</code>.
Assembly: Meadow.dll
View Source
public abstract class Characteristic<T> : Characteristic, ICharacteristic, IAttribute, IJsonSerializable
Inheritance: System.Object
-> Meadow.Gateways.Bluetooth.Characteristic
Derived:
Meadow.Gateways.Bluetooth.CharacteristicBool, Meadow.Gateways.Bluetooth.CharacteristicInt32, Meadow.Gateways.Bluetooth.CharacteristicString
Implements:
Meadow.Gateways.Bluetooth.ICharacteristic, Meadow.Gateways.Bluetooth.IAttribute, Meadow.Gateways.Bluetooth.IJsonSerializable
Methods
SerializeValue(T)
Serializes the value of type <code class="typeparamref">T</code> to a byte array.
View Source
protected abstract byte[] SerializeValue(T value)
Returns
System.Byte[]
: The byte array representing the serialized value.
Parameters
Type | Name | Description |
---|---|---|
<T> | value | The value to be serialized. |
SetValue(T)
Sets the value of the characteristic.
View Source
public void SetValue(T value)
Parameters
Type | Name | Description |
---|---|---|
<T> | value | The value to be set. |
SetValue(object)
Sets the value of the characteristic.
View Source
public override void SetValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to be set. |